package com.rizhov.gui;

import java.util.Arrays;

import javax.swing.JTextArea;

import com.rizhov.graph.Graph;

public class StatisticTextArea extends JTextArea {

    Graph graph = Graph.getInstance();

    public StatisticTextArea() {

    }

    public void update() {
	StringBuilder sb = new StringBuilder();
	sb.append(graph.getStatisticsString());
	sb.append("----------------------------------------------------- \n");
	sb.append("LayoutPanel data: ----------------------------------- \n");
	sb.append("EllipseArr data: " + LayoutPanel.getInstance().ellipseArr.toString() + '\n');
	sb.append("Index arr      : " + Arrays.toString(LayoutPanel.getInstance().indexArr) + '\n');
	this.setText(sb.toString());
    }
}
